import React from 'react';
import ErrorPageIcon from '@/assets/images/error-icon.png';
import './index.less';
import { withRouter } from 'react-router-dom';

interface IErrorPageProps {
  history: any;
}

function ErrorPage(props: IErrorPageProps) {
  return (
    <div className="error-page">
      <img className="error-page-icon" src={ErrorPageIcon} alt="" />
      <div className="error-page-desc">系统异常</div>
      <div
        className="error-page-btn"
        onClick={() => {
          props.history.replace(`/`);
        }}
      >
        重新加载
      </div>
    </div>
  );
}

export default withRouter(ErrorPage);
